#include <stdio.h>

int DEC_OCT(int x)

{
    if(x<8)
        return x;
    return DEC_OCT(x/8)*10+x%8;
}
int main()
{
    int x;
    printf("x_dec: ");
    scanf("%d",&x);
    printf("x_oct: %d\n",DEC_OCT(x));
    return 0;
}
